This package implements isp and misp (proposed by our ICDM 2012 paper: "Time Constrained Influence Maximization in Social Networks"), which can be used for both time constrained and traditional versions of influence maximization problems. This package is limited to academic use only.

There are two directories in this package. One is for the time constrained influence maximization, the other is for the traditional influence maximization problem (without time constraint).

===============How To Compile======================
This package was tested on *nix-like systems. such as Linux, MacOS. Use it on Windows platform might need some code modifications.

1. Install boost library (It's quite easy and straightforward. Also please check your system to see if boost has already been installed. It's very likely your linux server has it already.)
Download boost at: http://www.boost.org/users/download/
Compile boost as described by: http://www.boost.org/doc/libs/1_52_0/more/getting_started/unix-variants.html

2. Modify makefile in the directories.
modify the following two lines, so that they point to the location of the boost library on your system.

INC = /usr/local/boost_1_52_0
BOOSTLIB = /usr/local/boost_1_52_0/stage/lib/

3. make it
Then you will find five binaries: mc, isp, ispmt, misp and mispmt.
mc is simulation based algorithm.
isp and misp are described in our ICDM12 paper.
ispmt (mispmt) is the multiple thread version of isp (misp).

==================How To Run=========================
Let take the "isp" binary under "time constrained problem" directory for example. Other binaries are similar.
You can get the usage info of isp by running "./isp", which will print out something like:

Input:
1. graph path
2. T
3. K
4. theta

"graph path" is the path to the input graph file.
"T" is the time limit.
"K" is the number of seed nodes.
"theta" is a tunning parameter, which is described in our ICDM12 paper.

For example, to apply isp to a social graph wiki.txt located in the same directory with T=10, k=50 and theta=0.00001,
we need to run "./isp ./wiki.txt 10 50 0.00001".

==================The Format of Input Graph File========================
The input graph file contains multiple lines, each of which represents a directed edge.
For example, a graph with 5 nodes 1, 2, 3, 4, 5 and 4 directed edges 1->2, 2->3, 3->4, 4->5 can be represented as:

1 2
2 3
3 4
4 5


